package zhr.chapter4.example2;

public class Main {
    public static void main(String[] args) {
        Point p=new Point();
        p.print();
        p.move(50,50);
        System.out.println("**移动之后**");
        System.out.println("直接得到x,y");
        System.out.println("x="+p.x+"y="+p.y);
        System.out.println("通过调用得到x,y");
        System.out.println("x="+p.getX()+"y="+p.getY());
        if (p.equal(50, 50)) {
            System.out.println("找到(50,50)");
        }else {
            System.out.println("未找到(50,50)");
        }
        p.newPoint("新的点产生").print();
        new Point(10,15,"其他新产生的点").print();
    }
}
